package com.openthinks.joyniproject.utils.spring;

import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;

import com.openthinks.joyniproject.utils.Init;

/**
 * 注入
 * @author Administrator
 *
 */

public class ApplicationCtx implements ApplicationContextAware {

	public static ApplicationContext ctx;
	@Override
	public void setApplicationContext(ApplicationContext ctx) throws BeansException {
		ApplicationCtx.ctx = ctx;
		ApplicationCtxInit.setServletCtx(ctx);
		Init.mvcInitFinish = true;
		Init.init();
	}

}

